﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

using Global.Class.Library;

namespace DataTransferObject
{
    public class MarketingProgramCustomerName : NotifyPropertyChangeObject
    {
        private int customerID;
        private DateTime effectedDate;
        private double salesTarget;
        private string remarks;


        public MarketingProgramCustomerName()
            : this(-1, DateTime.Today, 0, "")
        {
        }

        public MarketingProgramCustomerName(int customerID, DateTime effectedDate, double salesTarget, string remarks)
        {
            GlobalDefaultValue.Apply(this);

            this.CustomerID = customerID;
            this.EffectedDate = effectedDate;
            this.SalesTarget = salesTarget;
            this.Remarks = remarks;
        }

        #region Properties


        [DefaultValue(-1)]
        public int CustomerID
        {
            get { return this.customerID; }
            set { ApplyPropertyChange<MarketingProgramCustomerName, int>(ref this.customerID, o => o.CustomerID, value); }
        }

        [DefaultValue(typeof(DateTime), "01/01/1900")]
        public DateTime EffectedDate
        {
            get { return this.effectedDate; }
            set { ApplyPropertyChange<MarketingProgramCustomerName, DateTime>(ref this.effectedDate, o => o.EffectedDate, value); }
        }

        [DefaultValue(0)]
        public double SalesTarget
        {
            get { return this.salesTarget; }
            set { ApplyPropertyChange<MarketingProgramCustomerName, double>(ref this.salesTarget, o => o.SalesTarget, value); }
        }

        [DefaultValue("")]
        public string Remarks
        {
            get { return this.remarks; }
            set { ApplyPropertyChange<MarketingProgramCustomerName, string>(ref this.remarks, o => o.Remarks, value); }
        }

        #endregion
    }
}
